#include "omp.h"
#include <iostream>
#include <cstring>

#define MAXN 100
using namespace std;


void foo(int *arr, int thread_id) {
    arr[thread_id] = thread_id;
}

int main() {
    int arr[MAXN];
    memset(arr, 0, sizeof(int) * MAXN);

#pragma omp parallel num_threads(30)
    {
        int ID = omp_get_thread_num();
        foo(arr, ID);
    };
    for (int i = 0; i < MAXN; i++) {
        printf("%d ", arr[i]);
    }
    printf("\n");
    return 0;
}